package org.msss.gamebasic;

import org.lwjgl.util.Rectangle;

/**
 * This class will be a view. A view can follow a player or object. A view can
 * also stay in the same place. A view is a rectangle which the frame shows.
 * 
 * @author alanxoc3
 * 
 */
public class View {

	private Rectangle bounds;

	public View(int x, int y, int w, int h) {
		bounds = new Rectangle(x, y, w, h);
	}

	public View(int x, int y) {
		this(x, y, Frame.WINDOW_WIDTH/2, Frame.WINDOW_HEIGHT/2);
	}

	/**
	 * Default Constructor.
	 */
	public View() {
		this(0, 0, Frame.WINDOW_WIDTH/2, Frame.WINDOW_HEIGHT/2);
	}

	// Getters and setters...
	public int getX() {
		return bounds.getX();
	}

	public void setX(int x) {
		bounds.setX(x);
	}

	public int getY() {
		return bounds.getY();
	}

	public void setY(int y) {
		bounds.setY(y);
	}

	public int getW() {
		return bounds.getWidth();
	}

	public void setW(int w) {
		bounds.setWidth(w);
	}

	public int getH() {
		return bounds.getHeight();
	}

	public void setH(int h) {
		bounds.setHeight(h);
	}
}
